﻿package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SPet extends IMessageBase
    {
        public var publicPet:SPublicPet;
        public var baseFight:SFightAttribute;
        public var extraFight:SFightAttribute;
        public var addPercent:SFightAttributeAddPercent;
        public const _type:int = 15091;
        public static var _regist:SPet = new SPet(true);

        public function SPet(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SPet();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.publicPet.__write(param1);
            this.baseFight.__write(param1);
            this.extraFight.__write(param1);
            this.addPercent.__write(param1);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.publicPet = new SPublicPet();
            this.publicPet.__read(param1);
            this.baseFight = new SFightAttribute();
            this.baseFight.__read(param1);
            this.extraFight = new SFightAttribute();
            this.extraFight.__read(param1);
            this.addPercent = new SFightAttributeAddPercent();
            this.addPercent.__read(param1);
            return;
        }// end function

    }
}
